草庐IT

Android Studio 找不到 JUnit 包

全部标签

android - 找不到 Gradle DSL 方法 : 'resValue()' error

我在gradlesync时遇到这个错误。我在androiddefaultConfigblock中调用该方法。我用com.android.tools.build:gradle:1.3.0com.neenbedankt.gradle.plugins:android-apt:1.4构建.gradle//Top-levelbuildfilewhereyoucanaddconfigurationoptionscommontoallsub-projects/modules.applyfrom:'config.gradle'buildscript{repositories{jcenter()}dep

java - Android PointF 构造函数在 JUnit 测试中不起作用

我在尝试编写JUnit测试时偶然发现了这一点。诚然,这是我在JUnit中的第一个单元测试,但我确实发现这种行为非常令人费解。packagecom.example.dom.pointfbugrepro;importandroid.graphics.PointF;importorg.junit.Test;importstaticorg.junit.Assert.*;publicclassExampleUnitTest{@Testpublicvoidpointf_isCorrect()throwsException{PointFfoo=newPointF(5,0);assertEquals(

android - 无法在 Android JUnit 4 仪器测试中启动未绑定(bind)服务

我正在尝试使用测试支持库框架来测试基本的未绑定(bind)服务:http://developer.android.com/tools/testing-support-library/index.html本地服务.java:publicclassLocalServiceextendsService{@OverridepublicIBinderonBind(Intentintent){returnnull;}}本地服务测试.java:@RunWith(AndroidJUnit4.class)publicclassLocalServiceTest{@RulepublicfinalServic

android - 找不到变量 : _d when running react native app for the first time

我刚刚使用react-nativeinitdemoone创建了ReactNative应用程序,并使用react-nativestart启动了js服务器,然后尝试使用react-执行应用程序native运行android但是我在安装模拟器时遇到以下错误。找不到变量:_d(http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:1) 最佳答案 我在尝试在Win10中设置react-native环境并尝试运行示例项目时遇到了同样的问题。经过数小时的敲

android - AndroidX 迁移后找不到符号 DataBindingComponent

将我的整个项目迁移到androidx后,我无法再编译它了。我收到100个以下错误:e:M:\tmp\EverywhereLauncher\app\generated\data_binding_base_class_source_out\devWithoutTestWithAccessibilityDebug\dataBindingGenBaseClassesDevWithoutTestWithAccessibilityDebug\out\com\my\app\databinding\ActivityMainBinding.java:52:error:cannotfindsymbol@N

android - 在 PackageManager.GET_CONFIGURATIONS 找不到名称异常

我正在尝试使用以下代码显示versionNamePackageManagerpkm=getPackageManager();PackageInfopki=pkm.getPackageInfo("com.example",PackageManager.GET_CONFIGURATIONS);StringtempCurrentVersion=pki.versionName;但我在PackageManager.GET_CONFIGURATIONS处遇到异常,如NameNotFoundException请告诉我如何解决这个问题。谢谢 最佳答案

Android,用javah生成jni头文件,提示找不到org.opencv.core.Mat的错误

当我使用javah编译java类中的native方法以生成JNI头文件时,我遇到了一个令人讨厌的jni问题。如果类使用了第三方包,例如:org.opencv.core.Mat,那么javah会报找不到org.opencv.core的错误。垫类。OpenCV示例代码如下:packageorg.opencv.samples.fd;importorg.opencv.core.Mat;importorg.opencv.core.MatOfRect;publicclassDetectionBasedTracker{publicDetectionBasedTracker(Stringcascade

java - 找不到类 'android.support.v4.widget.SwipeRefreshLayout'

这个问题在这里已经有了答案:eclipsecan'tfindandroid.support.v4.widget.SwipeRefreshLayout(9个回答)关闭8年前。我不断收到此错误,它导致我的应用程序崩溃。尝试实现新的v4滑动刷新布局。我已经更新了支持库+sdk。什么问题?找不到类“android.support.v4.widget.SwipeRefreshLayout”,从方法......onCreate中引用importandroid.support.v4.widget.SwipeRefreshLayout;...privateSwipeRefreshLayoutswipe

java - LibGDX 项目找不到 Assets 文件夹

我的构建环境突然遇到了问题,我不知道为什么。我可以使用gradlewdesktop:run运行我的项目,但是,当我尝试使用右键单击作为桌面应用程序运行(当然是在桌面项目上)从Eclipse运行项目时,它突然找不到我的pack.atlas文件。毫无疑问,该文件存在。我已经多次刷新我的eclipse项目,并且该项目使用gradle命令行运行良好。昨天工作正常。我能想到的唯一让事情变得困惑的事情是我昨天在IDE中运行了一个Gradle命令,但我不确定它怎么会像这样搞砸了。弄清楚这个问题对我来说很重要,因为我无法使用Eclipse调试器来处理这个错误。有没有人猜到为什么Eclipse看不到As

android - 找不到 com.parse.bolts :bolts-android:1. 1.2。在手机差距项目(android studio)中?

我是phonegap的新手。在我的项目中集成了facebook插件。运行后显示错误`Error:Aproblemoccurredconfiguringrootproject'android'.'Couldnotresolvealldependenciesforconfiguration':_debugCompile'.Couldnotfindcom.parse.bolts:bolts-android:1.1.2.Searchedinthefollowinglocations:file:/C:/Users//AppData/Local/Android/sdk/extras/android